<?php
use Illuminate\Database\Seeder;

class MenuSeeder extends Seeder
{

    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //$menus = ['project', 'admin', 'document', 'task'];
        $menus = [
            [
                'name'=>'home',
                'action' =>'/home',
                'label' => 'home',
                'icon' => 'zmdi zmdi-home'
            ],
            [   
                'name'=>'project',
                'action' =>'/project',
                'label' => 'project',
                'icon' => 'zmdi zmdi-apps'
            ],
            [
                'name'=>'admin',
                'action' =>'/admin',
                'label' => 'admin',
                'icon' => 'zmdi zmdi-wrench'
            ],
            [
                'name'=>'document',
                'action' =>'/document',
                'label' => 'document',
                'icon' => 'zmdi zmdi-folder'
            ],
            [
                'name'=>'task',
                'action' =>'/task',
                'label' => 'task',
                'icon' => 'zmdi zmdi-assignment'
            ],
        ];

        array_map(function ($menu) {
            DB::table('menus')->insert($menu);
        }, $menus);
    }
}
